<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加新闻</title>
<script  src="<?=base_url()?>fckeditor/fckeditor.js" language="javascript"></script>
<script src="<?=base_url()?>system/application/views/css/js.js" language="javascript"></script>
<link href="<?=base_url()?>system/application/views/css/style.css" rel="stylesheet" type="text/css" />
<link href="<?=base_url()?>system/application/views/css/admin_edit.css" rel="stylesheet" type="text/css" />
<script>
var  myfck = new  FCKeditor('content');
myfck.Width = 600;
myfck.Height = 300;
myfck.BasePath = '<?=base_url()?>fckeditor/';
myfck.ToolbarSets='Basic';
function  $(id){
	return  document.getElementById(id);
}
function  clonediv(){
	var  divchild =  $('file1').cloneNode(true);//克隆结点
	divchild.style.display = 'block';//把已克隆的结点显示
	$('out').appendChild(divchild);//把结点加入到id为out的div中
}

function  insertfile(obj){
	var oEditor = FCKeditorAPI.GetInstance('mycontent');//实例化fck中的api对象

	// alert(obj);
	var  file_url = obj.parentNode.firstChild.value;//obj
	//alert(file_url);
	file_url = file_url.replace(":",'|');
	file_url = file_url.replace('\\','/');
	file_url = "<img src=\"file:///"+file_url+"\">";
	target_url = "file:///"+file_url;
	alert(file_url);
	oEditor.InsertHtml(file_url);
	obj.nextSibling.value = target_url;
	//调用api对象中的insertHtml方法将括号里的内容插入fck
}

</script>
</head>
<body>
<div class="wrap">
<table id="mytable" cellspacing="0"> 
<?php echo form_open('admin_news/insertnews'); ?>
<tr> 
<th class="col">标题</th> 
<td class="row"><input type="text" id="title" name="title" size="25"  /></td>
</tr> 
<tr>
<th class="col">所属类别</th>
<td class="row">
	<select name="sortid">
        <?php foreach ($child as $value){?><option value="<?php echo $value->sortid;?>">
		 <?php for($i=0;$i<$value->deep;$i++){echo "^_^";} echo $value->title;?></option>
		 <?php }?>
</td>
</tr>
<tr>
<th class="col">内容</th> 
<td class="row"><script language="javascript">
myfck.Create();
	  </script></td> 
</tr> 

<tr><td align="center" colspan="2"><input type="submit" onclick="return check_form();" value="ok"/></td></tr>

</table> 

</div>
      
    
</body>
</html>


    
	

   
 